Skip to content

Conversation

@justinmk3
Copy link
Contributor

@justinmk3 justinmk3 commented Nov 15, 2024

Problem

Beta and bug-bash users often need logs.

Solution

Log debug/verbose messages at "info" log-level. They will appear as "info" logs in the Output channel, even though they were logged at "debug" or "verbose" level.

Related

https://github.com/aws/aws-toolkit-vscode-staging/pull/1961 confirms CI behavior in a beta branch.


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@justinmk3 justinmk3 requested a review from a team as a code owner November 15, 2024 18:27
@github-actions

This comment was marked as resolved.


override sendToLog(level: LogLevel, message: string | Error, ...meta: any[]): number {
// XXX: force debug/verbose logs for Beta users.
level = this.isBeta ? 'info' : level
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this code so I can't tell if i'm missing something, but isn't this saying if its beta then use info? I thought we wanted verbose/debug if its beta users

Copy link
Contributor Author

@justinmk3 justinmk3 Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It forces the "sinks" (log providers such as Output channel, file, etc.) to log at "info" level. This forces the vscode Output channel to show logs that it would otherwise hide.

This is a hack because currently the vscode API doesn't give a way to programmatically set the Output channel log-level.

Pushed an improvement/fix: 87eebd4

Problem:
Beta and bug-bash users often need logs.

Solution:
Log debug/verbose messages at "info" log-level. They will appear as
"info" logs in the Output channel, even though they were logged at
"debug" or "verbose" level.
const logger = getLogger('dev/beta')

const downloadIntervalMs = 1000 * 60 * 60 * 24 // A day in milliseconds
const downloadIntervalMs = 1000 * 60 * 60 * 3 // 3 hours (8 times/day).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

increase frequency

@justinmk3 justinmk3 merged commit e7c8784 into aws:master Nov 15, 2024
23 of 25 checks passed
@justinmk3 justinmk3 deleted the morebeta branch November 15, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants